#ifndef __GLES2MULTIRENDERTARGET_H__
#define __GLES2MULTIRENDERTARGET_H__

#include "GLES2FrameBufferObject.h"

namespace PVM
{
	class GLES2FBOManager;
	
	class GLES2FBOMultiRenderTarget : public MultiRenderTarget
	{
	public:
		GLES2FBOMultiRenderTarget(GLES2FBOManager* manager, const std::string& name);
		~GLES2FBOMultiRenderTarget();
		
		virtual void getCustomAttribute(const std::string& name, void* pData);
		bool requiresTextureFlipping() const {return true;}
		
		virtual bool attachDepthBuffer(DepthBuffer* depthBuffer);
		virtual void detachDepthBuffer();
		virtual void _detachDepthBuffer();
	private:
		virtual void bindSurfaceImpl(size_t attachment, RenderTexture* target);
		virtual void unbindSurfaceImpl(size_t attachment);
		GLES2FrameBufferObject fbo;
	};
}

#endif
